const TokenKey = 'Premium Hotel System'
const UserKey = 'userInfo'

export const setToken = (token) => {
  return localStorage.setItem(TokenKey, token)
}

export const getToken = () => {
  return localStorage.getItem(TokenKey)
}

export const removeToken = () => {
  return localStorage.removeItem(TokenKey)
}

export const setUserKey = (userInfo) => {
  return localStorage.setItem(UserKey, JSON.stringify(userInfo))
}

export const getUserKey = () => {
  return JSON.parse(localStorage.getItem(UserKey))
}
export const removeUserKey = () => {
  return localStorage.removeItem(UserKey)
}
